package com.unicom.room.service;

import java.util.List;

import com.unicom.room.mapper.CheckInMapper;
import com.unicom.room.model.CheckInVo;
import com.unicom.room.model.CustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.unicom.room.model.RoomStatus;


@Service
@Transactional
public class CheckInService {

	@Autowired
	private CheckInMapper checkInMapper;
	
	public List<CheckInVo> listCheckIn() {
		return checkInMapper.listCheckInInfo();
	}
	
	public void insertCustomer(CustomerVo customer) throws Exception {
		checkInMapper.insertCustomer(customer);
	}

	public void deleteCheckIn(int id) {
		checkInMapper.deleteCheckIn(id);
	}

	public List<String> getFreeRoom(String roomNo) {
		return checkInMapper.getFreeRoom(roomNo);
	}

	public void changRoom(int id, String roomNo) throws Exception {
		checkInMapper.changeRoom(id, roomNo);
	}

	public List<RoomStatus> getAllRoomStatus(){
		return checkInMapper.getAllRoomStatus();
	}
	
}
